package com.event.ingestion.data.hbase;

import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;

public class UserFriendsParser extends com.event.ingestion.data.UserFriendsParser<Put> {
    @Override
    public Put parse(String[] fields) {
        Put p = new Put(Bytes.toBytes(fields[0] + "." + fields[1].hashCode()));

        //profile:uf
        p = p.addColumn(Bytes.toBytes("uf"),Bytes.toBytes("user_id"),Bytes.toBytes(fields[0]));
        p = p.addColumn(Bytes.toBytes("uf"),Bytes.toBytes("friend_id"),Bytes.toBytes(fields[1]));

        return p;
    }
}
